<#assign className = table.className?uncap_first>
import { PAGE_SIZE } from '../constants/constants';
import {request,requestJSON,requestForData} from '../utils/request';

export function getList(pageNum){
   return request(`${className}/get`, {
    method: 'GET' ,
    body:{current:pageNum.page,size:PAGE_SIZE}
  }); 
}

export function patch(id,values){
  return requestForData(`${className}/${r'${id}'}`, {
    method: 'PATCH' ,
    body:values  
  });
}

export function remove(id){
  return requestForData(`${className}/${r'${id}'}`, {
    method: 'DELETE'    
  });
}

export function add(values){
  return requestForData(`${className}/add`, {
    method: 'POST' ,
    body:values  
  });
}

export function detail(id){
   return request(`${className}/${r'${id.id}'}`, {
    method:'GET'  
  });
}


